home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / LockedFifo.h,v < prev    next >
Text File  |  1989-02-23  |  2KB  |  114 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    grunwald:3.2; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.35.45;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.49.59;  author grunwald;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     88.10.30.13.05.51;  author grunwald;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     88.09.18.16.42.09;  author grunwald;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 3.2
  35. log
  36. @Start using Gnu library heaps for schedulers
  37. @
  38. text
  39. @// This may look like C code, but it is really -*- C++ -*-
  40. // 
  41. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  42. //
  43. // written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  44. //
  45. #ifndef LOCKEDFIFOH
  46. #define LOCKEDFIFOH
  47.  
  48. #include "Semaphore.h"
  49. #include "AwesimeFifo.h"
  50.  
  51. class LockedFifo : public AwesimeFifo {
  52.  
  53. protected:
  54.     Semaphore fifoLock;
  55. public:
  56.  
  57.     inline LockedFifo(int defaultLength = 0)
  58.     : (defaultLength), fifoLock(1) {
  59.         //
  60.         // do nothing
  61.         //
  62.     }
  63.  
  64.     //
  65.     // Operations on the list -- these simply lock the list and
  66.     // then use the AwesimeFifo routines to perform the action.
  67.     //
  68.     virtual void add(AwesimeFifoItem *t);
  69.     virtual bool remove(AwesimeFifoItem *item);
  70.     virtual bool removeIfFound(AwesimeFifoItem* item);
  71.  
  72.     //
  73.     // Over-ride the doStart and doDone; these use the semaphore
  74.     // to lock out other threads.
  75.     //
  76.  
  77.     virtual bool doStart( AwesimeFifoIndex& index, AwesimeFifoItem* item);
  78.     virtual void doDone();
  79.  
  80.     //
  81.     // The size and printer also locks out other threads.
  82.     //
  83.     virtual unsigned int size();
  84.     virtual void classPrintOn(ostream& s);
  85. };
  86.              
  87. #endif LOCKEDFIFOH
  88. @
  89.  
  90.  
  91. 3.1
  92. log
  93. @Steay version
  94. @
  95. text
  96. @@
  97.  
  98.  
  99. 1.2
  100. log
  101. @*** empty log message ***
  102. @
  103. text
  104. @@
  105.  
  106.  
  107. 1.1
  108. log
  109. @Initial revision
  110. @
  111. text
  112. @d1 6
  113. @
  114.